<template>
        <div>
            {{str}}{{ num }}
            <button @click="num++">+1</button>
            <button @click="num--">-1</button>
        </div>
    </template>
    <script setup>
    import{ref}from 'vue'
    //事件绑定
    
    let num = ref(10)
    
    const sub = ()=>{
        num.value--
    }
    </script>
    <style scoped>
    </style>